I'm trying to create a view whch only lists nodes in the language they were first created, for instance if someone creates a node in english and then it is translated to spanish and other languages, i just want in the list the english version, not the further translated ones, the same goes if the first node is in another language, it doesn't matter, i want to list only the "original" ones, not the translations... i guess this is done with the "Node translation: Translation set node ID" filter, but it doesn't work!... after adding it I get this:
Error: handler for node > tnid doesn't exist!
The closest issue I found was this: http://drupal.org/node/315643, but it's not exactly the same issue, but i guess it would be a similar fix. I'd apretiate some help, thanks in advance
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | views-filter-tnid.patch | 3.29 KB | nedjo |
Comments
Comment #1
dergachev commentedI'm having the same problem. Will investigate.
Comment #2
dergachev commentedNot tested yet, but in your linked issue there's a comment giving a solution for this very problem. http://drupal.org/node/315643#comment-1044353
The file in question is in sites/all/views/modules/translation.views.inc
Comment #3
leanazulyoro commentedyes i tested that with no success...
Comment #4
dergachev commentedSeems to work for me.
Comment #5
leanazulyoro commentedyes, it does work, I just forgot to clear cache after modifing translations.views.inc. nevertheless I discovered this filter is not what need, I'll create a new issue for that, please include this modification in the next version: http://drupal.org/node/315643#comment-1044353
Comment #6
xanoI can confirm the bug is still there in 6.x-2.1. Since no fix has been committed, this issue cannot be marked 'fixed'.
//Edit: I can't get the fix to work. I edited lines 56 and 59 (replaced tnid handler by numeric handler) and cleared all caches. I am still getting the original error.
Comment #7
nedjoLooks like I left this filter out of the patch that added translation support.
I'll work up the filter.
Comment #8
nedjoHere's a patch that does two things:
1. Use the default numeric filter for node.tnid. This is parallel to node.nid. This part of the patch is a pure bugfix.
2. Add a filter for node source translation (what leanazulyoro was looking for).
This new filter is configurable to select whether only source translations should be shown (nodes with the same tnid as nid) or if untranslated nodes should also be shown (nodes with tnid = 0).
This part of the patch is the functionality that I think I had in mind originally but didn't complete.
We also need to remove the unsued views_handler_field_node_tnid. I'll open a separate issue for that.
Comment #9
xanoCan the filter also select only one translation per translation group, ordering the translations within a group by several conditions? Example: I'd like to show one translation per group, preferably in the current user's language, but in English if there is no translation in that specific language available.
Comment #10
leanazulyoro commentedgreat, I'll give it a try, but I have already found a solution for that: http://drupal.org/project/select_translation, I havent tried your patch yet nedjo, but this may be what Xano wants in #9
thanx!! i'll try it and report if everything work well
this is the issue i created for what I hwas needing: http://drupal.org/node/338503
Comment #11
leanazulyoro commentedall right... it works like a charm nedjo, anyway, you may want to consider some of the functionality in the "select translation" module (http://drupal.org/project/select_translation). thanks for everything =)
Comment #12
merlinofchaos commentedThanks nedjo! Committed!
Comment #14
Funkwarrior commentedSorry, I need some additionals infos how to accomplish that... somebody can help me? :)
Comment #15
Funkwarrior commentedWell, I found the solution: not difficult but for a novice is not simply clear :).
If somebody needs same solution:
To get the translated Fields from a single Nid:
On Filter pane of your view:
Node translation: Translation set node ID = 62
Node translation: Language = Current user's language
That's it.